<?php
	require('../Model/mysql.php');
	require('../host_config.php');
 	$mysql = new MySQL();
	$link = $mysql->connect($mysql_host, $mysql_user, $mysql_passwd, $mysql_db);
	$shopid = $mysql->real($_POST["shopid"]);
 	//$all_name = $_POST['all_name'];
	//$all_name = mysql_real_escape_string($all_name);
	//if ($all_name != NULL) {
	if ($shopid != NULL) {
	 	//$sql = "select * from android where all_name = '$all_name'";
		$sql = "select * from Shops where shopid = '$shopid'";
		$result = $mysql->query($sql, $link);
	 	while($e=mysql_fetch_assoc($result))
 			$output[]=$e;
 		print(json_encode($output));
	}else {
		echo "<script language='javascript'>";
		echo "alert('You have no permission to read this page!');";
		echo "history.back();";
		echo "</script>";
		header("location:../login.php");
	}
?>
